<?php
$str = "中华人民共和国！";
$s = "和";
echo strpos($str, $s);
echo "<br/>";
echo strlen($str);
echo "<br/>";
// 设置正确的编码
mb_internal_encoding("utf-8");

echo mb_strpos($str, $s);
echo "<br/>";
echo mb_strlen($str);